<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "robot".
 *
 * @property string $id
 * @property string $no
 * @property string $type
 * @property string $operate
 * @property string $operate_val
 * @property string $robot_account_id
 * @property integer $hearbeat
 * @property string $state
 * @property string $app_id
 * @property integer $create_time
 */
class Robot extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'robot';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['hearbeat', 'create_time'], 'integer'],
            [['id', 'robot_account_id'], 'string', 'max' => 36],
            [['no'], 'string', 'max' => 60],
            [['type', 'operate', 'state'], 'string', 'max' => 10],
            [['operate_val'], 'string', 'max' => 100],
            [['app_id'], 'string', 'max' => 30],
            [['no'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'no' => 'No',
            'type' => 'Type',
            'operate' => 'Operate',
            'operate_val' => 'Operate Val',
            'robot_account_id' => 'Robot Account ID',
            'hearbeat' => 'Hearbeat',
            'state' => 'State',
            'app_id' => 'App ID',
            'create_time' => 'Create Time',
        ];
    }
}
